package ex.recruit.service;

import java.io.Serializable;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;

import modules.recruit.entity.ApplyManager;
import modules.recruit.service.ApplyManagerService;

import org.springframework.jdbc.core.RowMapper;

import site.user.vo.ApplyListVoSite;

import com.guinea.core.PropertyFilterForSql;
import com.guinea.core.orm.JdbcDao;
import com.guinea.core.orm.Page;
import com.guinea.core.utils.CommonUtils;
import com.guinea.core.utils.StringUtils;

public class ApplyManagerServiceEx extends ApplyManagerService {

	public ApplyManager getManagerByBasePosition(Serializable baseId,
			String position) {
		List l = getApplyManagerDao()
				.find(
						"select m from ApplyManager m where m.status = '1' and m.base.id = ? and m.position = ?",
						new Object[] { (Long)baseId, position });
		if (l != null && l.size() > 0)
			return (ApplyManager) l.get(0);
		return null;
	}
	public List getExperiencesOfManager(Long applyManagerId) {
		List l = getApplyManagerDao()
				.find(
						"select e from Experience e where e.status = '1' and e.manager.id = ? order by e.period desc",
						new Object[] { applyManagerId });
		return l;
	}
}
